package com.hmall.hmallapi.api;

import com.hmall.hmallapi.config.DefaultFeignConfig;
import com.hmall.hmallapi.dto.ItemDTO;
import com.hmall.hmallapi.fallback.UserServiceFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Collection;
import java.util.List;

/**
 * @author malty
 */
@FeignClient(name = "user-service", configuration = DefaultFeignConfig.class, fallbackFactory = UserServiceFallBack.class)
public interface UserService {
    @PutMapping("/users/money/deduct")
    void deductMoney(@RequestParam("pw") String pw, @RequestParam("amount") Integer amount);
}
